import { createApp } from "vue";
import pinia from "./stores";
import ElementPlus from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import "element-plus/dist/index.css";
//根页面
import App from "./App.vue";
//引入路由
import router from "./router";
import "./styles/index.scss";
//将阿里图标和ELment-ui图标变成全局组件
import ElSvg from "./components/SvgIcon/ElSvg";
//路由守卫
import "./permission";
//注册全局组件
import Category from "@/components/Category/index.vue";
const app = createApp(App);
//自定义指令 权限按钮
import { has } from "@/utils/buttonIsCan";
has(app);

ElSvg(app);
app.component("Category", Category);
app
  .use(pinia)
  .use(router)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount("#app");
